# a = [1, 2, 3, 4]
# print(a[1:4])

# a = [1, 2, 3, 4]
# # 省略右边界，表示左边界开始，取到整个列表结束
# print(a[1:])
# # 省略左边界，表示从从列表的0号元素开始，取到右边界
# print(a[:3])
# # 同时省略左、右边界，表示取列表的全部元素
# print(a[:])

# a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# print(a[::1])
# print(a[::2])

# a = ['aa', 'bb', 'cc', 'dd']
# a.remove('cc')
# print(a)
# a.pop(1)
# print(a)
# a.pop()
# print(a)
# a.insert(1, 'hello')
# # 下标超过范围时，默认在最后位置插入
# a.insert(100, 'world')
# print(a)

# # 在最后位置插入元素'hello'
# a.append('hello')
# print(a)
# i = 0
# while i < len(a):
#     a[i] += 10
#     i += 1
#
# print(a)

# for i in range(0, len(a)):
#     a[i] += 10
#
# print(a)

# a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# for elem in a:
#     elem += 10
#
# print(a)

# a = ['aa', 'bb', 'cc', 'dd']
# print(a.index('bb')) # 1
# print('cc' in a) # True
# print('ff' in a) # False
# print('cc' not in a) # False
# print('ff' not in a) # True

# a = [1, 2, 3, 4]
# b = [5, 6, 7, 8]
# c = a.extend(b)
# print(c)
# print(a)

# a += b;
# print(a)
# print(b)
# c = a + b
# print(c)

# a = (1, 2, 3, 4)
# print(a)

# b = tuple()
# print(type(a))
# print(type(b))

# a = ('a', 3, True, [])
# print(a)

# a = (1, 2, 3, 4)
# print(a[1])
# print(a[-1])
# 下标不能越级，否则会抛异常
# print(a[100])

# a = (1, 2, 3, 4, 5)
# print(a[1:3])

# a = (1, 2, 3, 4)
# # 1、范围for
# for elem in a:
#     print(elem)
#
# # 2、普通 for 循环
# for i in range(0, len(a)):
#     print(a[i])
#
# # 3、while 循环
# i = 0
# while i < len(a):
#     print(a[i])
#     i += 1

# a = (1, 2, 3, 4)
# print(3 in a)
# print(3 not in a)
# print(a.index(3))

# a = (1, 2, 3, 4)
# b = (5, 6, 7, 8)
# print(a + b)

# a = (1, 2, 3, 4)
# a[1] = 20

def Func():
    x = 10
    y = 20
    return x, y

print(type(Func()))

# 这里会把元组的元素依次取出来，赋值给a、b
a, b = Func()








